You learned that the Visual Basic data control has three database-related events:
·Reposition: Occurs each time the record pointer is moved to a new record in the Dynaset
·Validate: Occurs each time the record pointer leaves the current record in the Dynaset
·Error: Occurs each time a database error occurs
You learned how to use Visual Basic-bound form controls to link form input and display controls to data fields in the database.
· Bound textbox control: Used for data entry on character and numeric data table fields
· Bound label control: Used for display-only character and numeric data table fields
· Bound checkbox control: Used for data entry on the BOOLEAN data type field
· Bound image control: Used to display images stored in the BINARY data type field
· The 3D panel control behaves the same as the label control, and the 3D checkbox control behaves the same as a standard checkbox control
You also learned several general rules for creating Visual Basic forms in the Windows 95 style:
· The default color is light gray for backgrounds.
· Use the panel3D control to create a palette on which to place all other controls.
· The default font is 8-point sans serif, regular.
· Input areas should have a background that is white; display areas should have a background that is light gray. Display areas should be recessed into the input palette.
· Use frame controls to group related items on a form.
· Left-justify all controls, including field prompts. Field prompts should be written in mixed case and followed by a semicolon.
· Standard spacing and sizing for common controls are as follows:
· Control height is 330 twips.
· Command button width is 1200 twips.
· Vertical spacing between controls is 90 twips for related items and 210 twips for unrelated items.
· Border widths (top, bottom, and side) should be 120 twips.